package com.nwcl.basic.dao;


import com.nwcl.basic.entity.Goods;
import com.nwcl.basic.entity.Orders;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
* @author lgq
* @description 针对表【orders(订单表)】的数据库操作Mapper
* @createDate 2023-05-26 13:48:38
* @Entity .com.nwcl.basic.entity.Orders
*/
@Repository
public interface OrdersDao {

    void save(Orders orders);

    Orders getOrderByCode(@Param("orderCode") String orderCode);

    void updateOrderStatus(@Param("orderCode") String orderCode, @Param("status") Integer status, @Param("payTime") Date payTime);

    List<Goods> list(@Param("userId") Integer userId);

    Orders getByIdAndUserId(@Param("id") Integer id, @Param("userId") Integer userId);

    Integer countByUserId(@Param("userId") Integer userId);
}




